home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Steal This CD
/
steal_this_cd.iso
/
Chapter 07 - Where the Hackers Are
/
virc200.exe
/
{app}
/
ViRC2.chm
/
func
/
messagedlg.txt
< prev
next >
Wrap
Text File
|
2002-07-30
|
1KB
|
60 lines
<p class=syntax>Syntax:<br>
MessageDlg <var>options</var> <var>prompt</var><br>
$MessageDlg(<var>options</var> <var>prompt</var>)</p>
<p>Displays <var>prompt</var> in a message dialog box, with an icon and a choice
of buttons. The icon and buttons are controlled by <var>options</var>, which is
the sum of the appropriate numbers from this list:</p>
<ul>
<li>Buttons shown:
<ul>
<li>OK = 0
<li>OK, Cancel = 1
<li>Abort, Retry, Ignore = 2
<li>Yes, No, Cancel = 3
<li>Yes, No = 4
<li>Retry, Cancel = 5
</ul>
<li>Icon shown:
<ul>
<li>No icon = 0
<li>STOP icon = 16
<li>Question mark icon = 32
<li>Exclamation point icon = 48
<li>Information icon = 64
</ul>
<li>Default button:
<ul>
<li>First button is default = 0
<li>Second button is default = 256
<li>Third button is default = 512
</ul>
</ul>
<p>If MessageDlg is called as a function, the return value depends on the
button selected by the user:</p>
<ul>
<li>OK = 1
<li>Cancel = 2
<li>Abort = 3
<li>Retry = 4
<li>Ignore = 5
<li>Yes = 6
<li>No = 7
</ul>
<pre class=example>Example:
// show Yes, No, Cancel with question icon
@l $x = $MessageDlg(35 Do you want to save your changes before quitting?)
switch $x
case 6:
// yes - save changes
case 7:
// no - discard changes
case 2:
// cancel - don't quit
endswitch</pre>
<p class=seealso>See also: <a href="../cmd/messagebox.htm">MessageBox</a></p>